  var id = getvl("id");
$(function(){
      
        if(id != '') {
        	
        	   	  $.ajax({
        url: urlcore + "/api/comment/dianpusum?shopid="+id,
        type: "get",
        dataType: 'json',
        contentType: "application/json;charset=utf-8",
        success:function(data){
            if (data.success == true) {
            //alert(JSON.stringify("..."+data.data));
            	$("#pinjiashu").html(data.data+"条评价");
            } else if (data.code == 'OVERTIME'){
                var thisUrl = window.location.href;
                if (thisUrl.indexOf('login.html') <= -1) {
                    top.window.location.href="1.0.0denglu.html";
                }
            } else {
                alert(data.msg);
            }
        },
        error:function() {
            alert("error");
        }
    });
    
    ///
    
  	 $.ajax({
        url: urlcore + "/api/comment/FindastoreID?shopid="+id,
        type: "get",
        dataType: 'json',
        contentType: "application/json;charset=utf-8",
        success:function(data){
            if (data.success == true) {
            	  var da=data.data;
                $("#haopinglu").html(da.praiseRate+"%");
                     	var pingfen='<ul class="clearfix">'+
		'<li class="clearfix">'+
			'<span>商家服务</span>';
			
			 for(var i=0;i<da.serviceLevel;i++){
					
					pingfen+='<img src="images/star.png"/>';
				}

			
		pingfen+='</li>'+
		'<li class="clearfix">'+
			'<span>商品品质</span>';
			for(var k=0;k<da.qualityLevel;k++){
					pingfen+='<img src="images/star.png" />';
				}
		pingfen+='</li>'+
		'<li class="clearfix">'+
			'<span>物流服务</span>';
			for(var d=0;d<da.carLevel;d++){
					pingfen+='<img src="images/star.png" />';
            	}
		pingfen+='</li>'+
	'</ul>';                
	          
            } else if (data.code == 'OVERTIME'){
                var thisUrl = window.location.href;
                if (thisUrl.indexOf('login.html') <= -1) {
                    top.window.location.href="1.0.0denglu.html";
                }
            } else {
                alert(data.msg);
            }
        },
        error:function() {
            alert("error");
        }
    });
  
        }else{
         	
            alert("没有传入有效值....");	
         }
       	
});//end

 